package com.modbus.tcp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.modbus.tcp.mapper.WirelessdataMapper;
import com.modbus.tcp.domain.Wirelessdata;
import com.modbus.tcp.service.IWirelessdataService;
import com.modbus.tcp.utils.Convert;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 无线温度数据 服务层实现
 *
 * @author d
 * @date 2024-07-11
 */
@RestController
public class WirelessdataServiceImpl implements IWirelessdataService {

    @Autowired
    private WirelessdataMapper wirelessdataMapper;

    /**
     * 查询无线温度数据信息
     *
     * @param collecttags 无线温度数据ID
     * @return 无线温度数据信息
     */
    @Override
    public Wirelessdata selectWirelessdataById(Integer collecttags) {
        return wirelessdataMapper.selectWirelessdataById(collecttags);
    }

    @Override
    public List<Wirelessdata> selectWirelessMaxById(Integer ballvalueid){
        return wirelessdataMapper.selectWirelessMaxById(ballvalueid);
    }
    /**
     * 查询无线温度数据列表
     *
     * @param wirelessdata 无线温度数据信息
     * @return 无线温度数据集合
     */
    @Override
    public List<Wirelessdata> selectWirelessdataList(Wirelessdata wirelessdata) {
        return wirelessdataMapper.selectWirelessdataList(wirelessdata);
    }

    /**
     * 新增无线温度数据
     *
     * @param wirelessdata 无线温度数据信息
     * @return 结果
     */
    @Override
    public int insertWirelessdata(Wirelessdata wirelessdata) {
        return wirelessdataMapper.insertWirelessdata(wirelessdata);
    }

    /**
     * 修改无线温度数据
     *
     * @param wirelessdata 无线温度数据信息
     * @return 结果
     */
    @Override
    public int updateWirelessdata(Wirelessdata wirelessdata) {
        return wirelessdataMapper.updateWirelessdata(wirelessdata);
    }

    /**
     * 删除无线温度数据对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteWirelessdataByIds(String ids) {
        return wirelessdataMapper.deleteWirelessdataByIds(Convert.toStrArray(ids));
    }
}